how to set javascript object properties